
		

-- D:\GOA\reslibrary\templete\res\modal\modalmgr.xsl 58
gr_module("gm_xinbanchunzhongyun")


mcgfprocessstepmgr = inherit(GmSql.list,GmBase.CallBack):name("mcgfprocessstepmgr")



mcgfprocessstepmgr.init = function (self,pagecount)

	local top = self
	
	
	GmSql.list.init(self,gInfo["path"]..'/'..g_local_db_name,'czy_processstep')
	GmBase.CallBack.init(self)
	
	self.baseurl = ''

	self.idPair = {}
	self.idPair['prev'] = '0'
	self.idPair['next'] = '0'
	
	self.pageCount = pagecount or 10
	self.totalPage = 0
	
	self:reset_maxminid('czy_processstep','id')
	
	
	self.action = {}
	self.op  = {}
	
	
	
	-----------------------------
	self.action['cgfprocessstepdetail'] = {} 	
	-------
	self.op['cgfprocessstepdetail'] = function(postparam,ui)
	
		local net = GmBase.czynet.get_instance()		
		local newpostparam = {}
		local tbname,callbackey,newpostparam = net:cgfprocessstepdetail()
		for a,b in pairs(top.action['cgfprocessstepdetail']) do
			if postparam[a] ~= nil then
				newpostparam[a] = postparam[a]
			end
		end
		net:add_callback(callbackey,ui)	
		local tb,callbackey = net:cgfprocessstepdetail(newpostparam)
		
	end	
		
  self.action['cgfprocessstepdetail']['id'] = { ['title'] = '编号' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfprocessstepdetail']['name'] = { ['title'] = '名称' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '22' }	
  self.action['cgfprocessstepdetail']['step_type'] = { ['title'] = 'step_type' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfprocessstepdetail']['scan_id'] = { ['title'] = 'æ¡ç æžªç¼–å?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '2' }	
  self.action['cgfprocessstepdetail']['scan_id_fan'] = { ['title'] = 'scan_id_fan' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '4' }	
  self.action['cgfprocessstepdetail']['scan_id_case'] = { ['title'] = 'scan_id_case' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '4' }	
  self.action['cgfprocessstepdetail']['entire_type'] = { ['title'] = 'entire_type' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '4' }	
  self.action['cgfprocessstepdetail']['disable'] = { ['title'] = '禁用' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '1' }	
  self.action['cgfprocessstepdetail']['piece_method'] = { ['title'] = 'piece_method' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '4' }	
  self.action['cgfprocessstepdetail']['unit_price'] = { ['title'] = 'unit_price' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfprocessstepdetail']['default_worker'] = { ['title'] = 'default_worker' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfprocessstepdetail']['finish'] = { ['title'] = 'finish' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '1' }	
  self.action['cgfprocessstepdetail']['priority'] = { ['title'] = 'priority' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfprocessstepdetail']['start_date'] = { ['title'] = '开始时间' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfprocessstepdetail']['start_date_type'] = { ['title'] = 'ç”Ÿäº§å¼€å§‹æ‰€éœ€å¤©æ•°çš„ç±»åž‹ï¼š0å¹¶è¡Œï¼ŒçŽ¯èŠ‚ä¹‹é—´æ²¡æœ‰ä¾èµ–ï¼Œå¯ä»¥éƒ½åœ¨åŒä¸€å¤©å¼€å§‹ï¼›1ä¸²è¡Œï¼ŒçŽ¯èŠ‚ä¹‹é—´æœ‰ä¾èµ–ï¼Œå¿…é¡»ç­‰ä¸Šä¸€ä¸ªçŽ¯èŠ‚å®Œæ¯•æ‰å¯ä»¥å¼€å§?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '3' }	
  self.action['cgfprocessstepdetail']['date'] = { ['title'] = '日期' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfprocessstepdetail']['line'] = { ['title'] = 'line' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '2' }	
  self.action['cgfprocessstepdetail']['note'] = { ['title'] = 'note' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfprocessstepdetail']['rename'] = { ['title'] = '`rename`' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '22' }	
  self.action['cgfprocessstepdetail']['to_delivery'] = { ['title'] = 'to_delivery' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '1' }	
  self.action['cgfprocessstepdetail']['forbidden'] = { ['title'] = '1ä¸ºå¯ç”¨ï¼Œ0ä¸ºç¦ç”?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '1' }	
  self.action['cgfprocessstepdetail']['system_type'] = { ['title'] = 'system_type' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }
  self.action['cgfprocessstepdetail']['list_source'] = { ['title'] = '' ,['t'] = 's' , ['max'] = 50 }
	
	-----------------------------
	self.action['cgfprocesssteplist'] = {} 	
	-------
	self.op['cgfprocesssteplist'] = function(postparam,ui)
	
		local net = GmBase.czynet.get_instance()		
		local newpostparam = {}
		local tbname,callbackey,newpostparam = net:cgfprocesssteplist()
		for a,b in pairs(top.action['cgfprocesssteplist']) do
			if postparam[a] ~= nil then
				newpostparam[a] = postparam[a]
			end
		end
		net:add_callback(callbackey,ui)	
		local tb,callbackey = net:cgfprocesssteplist(newpostparam)
		
	end	
		
  self.action['cgfprocesssteplist']['id'] = { ['title'] = '编号' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfprocesssteplist']['name'] = { ['title'] = '名称' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '22' }	
  self.action['cgfprocesssteplist']['step_type'] = { ['title'] = 'step_type' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfprocesssteplist']['scan_id'] = { ['title'] = 'æ¡ç æžªç¼–å?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '2' }	
  self.action['cgfprocesssteplist']['scan_id_fan'] = { ['title'] = 'scan_id_fan' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '4' }	
  self.action['cgfprocesssteplist']['scan_id_case'] = { ['title'] = 'scan_id_case' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '4' }	
  self.action['cgfprocesssteplist']['entire_type'] = { ['title'] = 'entire_type' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '4' }	
  self.action['cgfprocesssteplist']['disable'] = { ['title'] = '禁用' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '1' }	
  self.action['cgfprocesssteplist']['piece_method'] = { ['title'] = 'piece_method' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '4' }	
  self.action['cgfprocesssteplist']['unit_price'] = { ['title'] = 'unit_price' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfprocesssteplist']['default_worker'] = { ['title'] = 'default_worker' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfprocesssteplist']['finish'] = { ['title'] = 'finish' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '1' }	
  self.action['cgfprocesssteplist']['priority'] = { ['title'] = 'priority' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfprocesssteplist']['start_date'] = { ['title'] = '开始时间' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfprocesssteplist']['start_date_type'] = { ['title'] = 'ç”Ÿäº§å¼€å§‹æ‰€éœ€å¤©æ•°çš„ç±»åž‹ï¼š0å¹¶è¡Œï¼ŒçŽ¯èŠ‚ä¹‹é—´æ²¡æœ‰ä¾èµ–ï¼Œå¯ä»¥éƒ½åœ¨åŒä¸€å¤©å¼€å§‹ï¼›1ä¸²è¡Œï¼ŒçŽ¯èŠ‚ä¹‹é—´æœ‰ä¾èµ–ï¼Œå¿…é¡»ç­‰ä¸Šä¸€ä¸ªçŽ¯èŠ‚å®Œæ¯•æ‰å¯ä»¥å¼€å§?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '3' }	
  self.action['cgfprocesssteplist']['date'] = { ['title'] = '日期' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfprocesssteplist']['line'] = { ['title'] = 'line' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '2' }	
  self.action['cgfprocesssteplist']['note'] = { ['title'] = 'note' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfprocesssteplist']['rename'] = { ['title'] = '`rename`' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '22' }	
  self.action['cgfprocesssteplist']['to_delivery'] = { ['title'] = 'to_delivery' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '1' }	
  self.action['cgfprocesssteplist']['forbidden'] = { ['title'] = '1ä¸ºå¯ç”¨ï¼Œ0ä¸ºç¦ç”?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '1' }	
  self.action['cgfprocesssteplist']['system_type'] = { ['title'] = 'system_type' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }
  self.action['cgfprocesssteplist']['list_source'] = { ['title'] = '' ,['t'] = 's' , ['max'] = 50 }
	
	-----------------------------
	self.action['cgfprocesssteppost'] = {} 	
	-------
	self.op['cgfprocesssteppost'] = function(postparam,ui)
	
		local net = GmBase.czynet.get_instance()		
		local newpostparam = {}
		local tbname,callbackey,newpostparam = net:cgfprocesssteppost()
		for a,b in pairs(top.action['cgfprocesssteppost']) do
			if postparam[a] ~= nil then
				newpostparam[a] = postparam[a]
			end
		end
		net:add_callback(callbackey,ui)	
		local tb,callbackey = net:cgfprocesssteppost(newpostparam)
		
	end	
		
  self.action['cgfprocesssteppost']['id'] = { ['title'] = '编号' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfprocesssteppost']['name'] = { ['title'] = '名称' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '22' }	
  self.action['cgfprocesssteppost']['step_type'] = { ['title'] = 'step_type' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfprocesssteppost']['scan_id'] = { ['title'] = 'æ¡ç æžªç¼–å?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '2' }	
  self.action['cgfprocesssteppost']['scan_id_fan'] = { ['title'] = 'scan_id_fan' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '4' }	
  self.action['cgfprocesssteppost']['scan_id_case'] = { ['title'] = 'scan_id_case' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '4' }	
  self.action['cgfprocesssteppost']['entire_type'] = { ['title'] = 'entire_type' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '4' }	
  self.action['cgfprocesssteppost']['disable'] = { ['title'] = '禁用' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '1' }	
  self.action['cgfprocesssteppost']['piece_method'] = { ['title'] = 'piece_method' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '4' }	
  self.action['cgfprocesssteppost']['unit_price'] = { ['title'] = 'unit_price' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfprocesssteppost']['default_worker'] = { ['title'] = 'default_worker' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfprocesssteppost']['finish'] = { ['title'] = 'finish' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '1' }	
  self.action['cgfprocesssteppost']['priority'] = { ['title'] = 'priority' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfprocesssteppost']['start_date'] = { ['title'] = '开始时间' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfprocesssteppost']['start_date_type'] = { ['title'] = 'ç”Ÿäº§å¼€å§‹æ‰€éœ€å¤©æ•°çš„ç±»åž‹ï¼š0å¹¶è¡Œï¼ŒçŽ¯èŠ‚ä¹‹é—´æ²¡æœ‰ä¾èµ–ï¼Œå¯ä»¥éƒ½åœ¨åŒä¸€å¤©å¼€å§‹ï¼›1ä¸²è¡Œï¼ŒçŽ¯èŠ‚ä¹‹é—´æœ‰ä¾èµ–ï¼Œå¿…é¡»ç­‰ä¸Šä¸€ä¸ªçŽ¯èŠ‚å®Œæ¯•æ‰å¯ä»¥å¼€å§?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '3' }	
  self.action['cgfprocesssteppost']['date'] = { ['title'] = '日期' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfprocesssteppost']['line'] = { ['title'] = 'line' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '2' }	
  self.action['cgfprocesssteppost']['note'] = { ['title'] = 'note' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfprocesssteppost']['rename'] = { ['title'] = '`rename`' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '22' }	
  self.action['cgfprocesssteppost']['to_delivery'] = { ['title'] = 'to_delivery' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '1' }	
  self.action['cgfprocesssteppost']['forbidden'] = { ['title'] = '1ä¸ºå¯ç”¨ï¼Œ0ä¸ºç¦ç”?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '1' }	
  self.action['cgfprocesssteppost']['system_type'] = { ['title'] = 'system_type' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }
  self.action['cgfprocesssteppost']['list_source'] = { ['title'] = '' ,['t'] = 's' , ['max'] = 50 }
	
	-----------------------------
	self.action['cgfprocessstepitem'] = {} 	
	-------
	self.op['cgfprocessstepitem'] = function(postparam,ui)
	
		local net = GmBase.czynet.get_instance()		
		local newpostparam = {}
		local tbname,callbackey,newpostparam = net:cgfprocessstepitem()
		for a,b in pairs(top.action['cgfprocessstepitem']) do
			if postparam[a] ~= nil then
				newpostparam[a] = postparam[a]
			end
		end
		net:add_callback(callbackey,ui)	
		local tb,callbackey = net:cgfprocessstepitem(newpostparam)
		
	end	
		
  self.action['cgfprocessstepitem']['id'] = { ['title'] = '编号' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfprocessstepitem']['name'] = { ['title'] = '名称' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '22' }	
  self.action['cgfprocessstepitem']['step_type'] = { ['title'] = 'step_type' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfprocessstepitem']['scan_id'] = { ['title'] = 'æ¡ç æžªç¼–å?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '2' }	
  self.action['cgfprocessstepitem']['scan_id_fan'] = { ['title'] = 'scan_id_fan' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '4' }	
  self.action['cgfprocessstepitem']['scan_id_case'] = { ['title'] = 'scan_id_case' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '4' }	
  self.action['cgfprocessstepitem']['entire_type'] = { ['title'] = 'entire_type' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '4' }	
  self.action['cgfprocessstepitem']['disable'] = { ['title'] = '禁用' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '1' }	
  self.action['cgfprocessstepitem']['piece_method'] = { ['title'] = 'piece_method' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '4' }	
  self.action['cgfprocessstepitem']['unit_price'] = { ['title'] = 'unit_price' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfprocessstepitem']['default_worker'] = { ['title'] = 'default_worker' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfprocessstepitem']['finish'] = { ['title'] = 'finish' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '1' }	
  self.action['cgfprocessstepitem']['priority'] = { ['title'] = 'priority' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfprocessstepitem']['start_date'] = { ['title'] = '开始时间' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfprocessstepitem']['start_date_type'] = { ['title'] = 'ç”Ÿäº§å¼€å§‹æ‰€éœ€å¤©æ•°çš„ç±»åž‹ï¼š0å¹¶è¡Œï¼ŒçŽ¯èŠ‚ä¹‹é—´æ²¡æœ‰ä¾èµ–ï¼Œå¯ä»¥éƒ½åœ¨åŒä¸€å¤©å¼€å§‹ï¼›1ä¸²è¡Œï¼ŒçŽ¯èŠ‚ä¹‹é—´æœ‰ä¾èµ–ï¼Œå¿…é¡»ç­‰ä¸Šä¸€ä¸ªçŽ¯èŠ‚å®Œæ¯•æ‰å¯ä»¥å¼€å§?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '3' }	
  self.action['cgfprocessstepitem']['date'] = { ['title'] = '日期' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfprocessstepitem']['line'] = { ['title'] = 'line' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '2' }	
  self.action['cgfprocessstepitem']['note'] = { ['title'] = 'note' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfprocessstepitem']['rename'] = { ['title'] = '`rename`' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '22' }	
  self.action['cgfprocessstepitem']['to_delivery'] = { ['title'] = 'to_delivery' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '1' }	
  self.action['cgfprocessstepitem']['forbidden'] = { ['title'] = '1ä¸ºå¯ç”¨ï¼Œ0ä¸ºç¦ç”?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '1' }	
  self.action['cgfprocessstepitem']['system_type'] = { ['title'] = 'system_type' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }
  self.action['cgfprocessstepitem']['list_source'] = { ['title'] = '' ,['t'] = 's' , ['max'] = 50 }
	
	-----------------------------
	self.action['cgfprocessstepmodify'] = {} 	
	-------
	self.op['cgfprocessstepmodify'] = function(postparam,ui)
	
		local net = GmBase.czynet.get_instance()		
		local newpostparam = {}
		local tbname,callbackey,newpostparam = net:cgfprocessstepmodify()
		for a,b in pairs(top.action['cgfprocessstepmodify']) do
			if postparam[a] ~= nil then
				newpostparam[a] = postparam[a]
			end
		end
		net:add_callback(callbackey,ui)	
		local tb,callbackey = net:cgfprocessstepmodify(newpostparam)
		
	end	
		
  self.action['cgfprocessstepmodify']['id'] = { ['title'] = '编号' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfprocessstepmodify']['name'] = { ['title'] = '名称' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '22' }	
  self.action['cgfprocessstepmodify']['step_type'] = { ['title'] = 'step_type' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfprocessstepmodify']['scan_id'] = { ['title'] = 'æ¡ç æžªç¼–å?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '2' }	
  self.action['cgfprocessstepmodify']['scan_id_fan'] = { ['title'] = 'scan_id_fan' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '4' }	
  self.action['cgfprocessstepmodify']['scan_id_case'] = { ['title'] = 'scan_id_case' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '4' }	
  self.action['cgfprocessstepmodify']['entire_type'] = { ['title'] = 'entire_type' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '4' }	
  self.action['cgfprocessstepmodify']['disable'] = { ['title'] = '禁用' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '1' }	
  self.action['cgfprocessstepmodify']['piece_method'] = { ['title'] = 'piece_method' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '4' }	
  self.action['cgfprocessstepmodify']['unit_price'] = { ['title'] = 'unit_price' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfprocessstepmodify']['default_worker'] = { ['title'] = 'default_worker' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfprocessstepmodify']['finish'] = { ['title'] = 'finish' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '1' }	
  self.action['cgfprocessstepmodify']['priority'] = { ['title'] = 'priority' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfprocessstepmodify']['start_date'] = { ['title'] = '开始时间' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfprocessstepmodify']['start_date_type'] = { ['title'] = 'ç”Ÿäº§å¼€å§‹æ‰€éœ€å¤©æ•°çš„ç±»åž‹ï¼š0å¹¶è¡Œï¼ŒçŽ¯èŠ‚ä¹‹é—´æ²¡æœ‰ä¾èµ–ï¼Œå¯ä»¥éƒ½åœ¨åŒä¸€å¤©å¼€å§‹ï¼›1ä¸²è¡Œï¼ŒçŽ¯èŠ‚ä¹‹é—´æœ‰ä¾èµ–ï¼Œå¿…é¡»ç­‰ä¸Šä¸€ä¸ªçŽ¯èŠ‚å®Œæ¯•æ‰å¯ä»¥å¼€å§?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '3' }	
  self.action['cgfprocessstepmodify']['date'] = { ['title'] = '日期' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfprocessstepmodify']['line'] = { ['title'] = 'line' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '2' }	
  self.action['cgfprocessstepmodify']['note'] = { ['title'] = 'note' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfprocessstepmodify']['rename'] = { ['title'] = '`rename`' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '22' }	
  self.action['cgfprocessstepmodify']['to_delivery'] = { ['title'] = 'to_delivery' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '1' }	
  self.action['cgfprocessstepmodify']['forbidden'] = { ['title'] = '1ä¸ºå¯ç”¨ï¼Œ0ä¸ºç¦ç”?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '1' }	
  self.action['cgfprocessstepmodify']['system_type'] = { ['title'] = 'system_type' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }
  self.action['cgfprocessstepmodify']['list_source'] = { ['title'] = '' ,['t'] = 's' , ['max'] = 50 }
	
  
 
  	
  
	self.session = {}
	
end   





mcgfprocessstepmgr.check_fields_validate = function(self,key,postparam)
	local checkfunc = {}
	checkfunc['t'] = function(fm,value)
		return true
	end
	checkfunc['min'] = function(fm,value)
		if string.len(value) < tonumber(fm) then
			return false
		end
		return true
	end
	checkfunc['max'] = function(fm,value)
		if string.len(value) > tonumber(fm) then
			return false
		end
		return true
	end
	local format = self.action[key]
	for fkey,fvalue in pairs(postparam) do
		if format[fkey] ~= nil then
			for fmkey,fmvalue in pairs(format[fkey]) do
				if checkfunc[fmkey] ~= nil then
					if checkfunc[fmkey](fmvalue,fvalue) == false then
						return false,tostring(format[fkey]['title']).." "..tostring(fmkey).." "..tostring(fmvalue).." error"
					end
				end
			end
		end
	end
	return true,""
end 


 
mcgfprocessstepmgr.get_session = function(self,key)
	if key == nil then
		key = 'default'
	end
	return self.session[key]
end

mcgfprocessstepmgr.has_session = function(self,key)
	if key == nil then
		key = 'default'
	end
	return self.session[key] ~= nil
end
 
 
mcgfprocessstepmgr.add_session = function(self,key,ses)
	self.session[key] = ses
end


mcgfprocessstepmgr.add_ui = function(self,key,ui)
	self.uis[key] = ui
end




-- todo
mcgfprocessstepmgr.run = function(self,key,ui)
	if self.action[key] ~= nil and self.op[key] ~= nil then
		local tb = {}
		for k,v in pairs(self.action[key]) do
			if ui[k] ~= nil and type(ui[k]) == 'table' and ui[k].get_text then
				tb[k] = ui[k]:get_text()
			else
				print('run error',key,k)
			end
		end
		local success,msg = self:check_fields_validate(key,tb)
		if success then
			self.op[key](tb,ui)
		else
			ui.hostWindow:showMsg(msg)
		end		
	else
		print('run error self.action',key)
	end
end


------------------------------------------------------------------------------------


mcgfprocessstepmgr.get_net_page = function(self,netmethon,attrs)
	local top = self	
	local discuz = GmBase.net.get_instance()
	local methon = netmethon
	if methon ~= nil and discuz[methon] then
		print('mcgfprocessstepmgr.get_net_page ',methon)
		local tbname,callbackey,tb = discuz[netmethon](discuz)
		for k,v in pairs(attrs) do
			tb[k] = attrs[k]
		end
		discuz[netmethon](discuz,tb)
	else
		print('mcgfprocessstepmgr.get_net_page error ',methon)
	end		
end




mcgfprocessstepmgr.get_prev_page = function(self,ui,callback)
	if ui.page ~= nil and type(ui.page) == 'number' then
		local uiattrs = ui:GetAttrs()
		local attrs = {}
		for a,b in pairs(self.action['cgfprocesssteplist']) do
			if type(uiattrs[a]) ~= nil then
				attrs[a] = uiattrs[a]
			end
		end
		attrs.page = ui.page - 1		

		if attrs.page < 1 then
			attrs.page = 1
		end

		self:get_net_page(ui.netmethon,attrs)
	end
end


mcgfprocessstepmgr.get_next_page = function(self,ui,callback)
	if ui.page ~= nil and type(ui.page) == 'number' then
		local uiattrs = ui:GetAttrs()
		local attrs = {}
		for a,b in pairs(self.action['cgfprocesssteplist']) do
			if type(uiattrs[a]) ~= nil then
				attrs[a] = uiattrs[a]
			end
		end
		attrs.page = ui.page + 1
		self:get_net_page(ui.netmethon,attrs)
	end
end

------------------------------------------------------------------------------------



mcgfprocessstepmgr.init_table = function(self)
	--[[
	local tablefield = {}
	
	--number
	tablefield['id'] = { ["i"] = 11, }
    
	--string
	tablefield['name'] = { ["v"] = 22, }
    
	--number
	tablefield['step_type'] = { ["i"] = 11, }
    
	--string
	tablefield['scan_id'] = { ["v"] = 2, }
    
	--string
	tablefield['scan_id_fan'] = { ["v"] = 4, }
    
	--string
	tablefield['scan_id_case'] = { ["v"] = 4, }
    
	--number
	tablefield['entire_type'] = { ["i"] = 4, }
    
	--number
	tablefield['disable'] = { ["i"] = 1, }
    
	--number
	tablefield['piece_method'] = { ["i"] = 4, }
    
	--string
	tablefield['unit_price'] = { ["v"] = 20, }
    
	--number
	tablefield['default_worker'] = { ["i"] = 11, }
    
	--number
	tablefield['finish'] = { ["i"] = 1, }
    
	--string
	tablefield['priority'] = { ["v"] = 12, }
    
	--string
	tablefield['start_date'] = { ["v"] = 11, }
    
	--number
	tablefield['start_date_type'] = { ["i"] = 3, }
    
	--string
	tablefield['date'] = { ["v"] = 12, }
    
	--number
	tablefield['line'] = { ["i"] = 2, }
    
	--string
	tablefield['note'] = { ["v"] = 255, }
    
	--string
	tablefield['rename'] = { ["v"] = 22, }
    
	--number
	tablefield['to_delivery'] = { ["i"] = 1, }
    
	--number
	tablefield['forbidden'] = { ["i"] = 1, }
    
	--number
	tablefield['system_type'] = { ["i"] = 11, }
    
	self:create_table( self.tablename, tablefield)
	]]
	self:initTableStruct()
end


	